Optimal. Leaf size=142 \[ -\frac {\left (5 a d f (3 d e-5 c f)-b \left (15 d^2 e^2-25 c d e f+8 c^2 f^2\right )\right ) x}{15 f^3}-\frac {(5 b d e-4 b c f-5 a d f) x \left (c+d x^2\right )}{15 f^2}+\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {(b e-a f) (d e-c f)^2 \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {542, 396, 211}
\begin {gather*} -\frac {(b e-a f) \text {ArcTan}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) (d e-c f)^2}{\sqrt {e} f^{7/2}}-\frac {x \left (5 a d f (3 d e-5 c f)-b \left (8 c^2 f^2-25 c d e f+15 d^2 e^2\right )\right )}{15 f^3}-\frac {x \left (c+d x^2\right ) (-5 a d f-4 b c f+5 b d e)}{15 f^2}+\frac {b x \left (c+d x^2\right )^2}{5 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 396
Rule 542
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right ) \left (c+d x^2\right )^2}{e+f x^2} \, dx &=\frac {b x \left (c+d x^2\right )^2}{5 f}+\frac {\int \frac {\left (c+d x^2\right ) \left (-c (b e-5 a f)+(-5 b d e+4 b c f+5 a d f) x^2\right )}{e+f x^2} \, dx}{5 f}\\ &=-\frac {(5 b d e-4 b c f-5 a d f) x \left (c+d x^2\right )}{15 f^2}+\frac {b x \left (c+d x^2\right )^2}{5 f}+\frac {\int \frac {c (b e (5 d e-7 c f)-5 a f (d e-3 c f))-\left (5 a d f (3 d e-5 c f)-b \left (15 d^2 e^2-25 c d e f+8 c^2 f^2\right )\right ) x^2}{e+f x^2} \, dx}{15 f^2}\\ &=-\frac {\left (5 a d f (3 d e-5 c f)-b \left (15 d^2 e^2-25 c d e f+8 c^2 f^2\right )\right ) x}{15 f^3}-\frac {(5 b d e-4 b c f-5 a d f) x \left (c+d x^2\right )}{15 f^2}+\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {\left ((b e-a f) (d e-c f)^2\right ) \int \frac {1}{e+f x^2} \, dx}{f^3}\\ &=-\frac {\left (5 a d f (3 d e-5 c f)-b \left (15 d^2 e^2-25 c d e f+8 c^2 f^2\right )\right ) x}{15 f^3}-\frac {(5 b d e-4 b c f-5 a d f) x \left (c+d x^2\right )}{15 f^2}+\frac {b x \left (c+d x^2\right )^2}{5 f}-\frac {(b e-a f) (d e-c f)^2 \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 115, normalized size = 0.81 \begin {gather*} \frac {\left (b (d e-c f)^2+a d f (-d e+2 c f)\right ) x}{f^3}+\frac {d (-b d e+2 b c f+a d f) x^3}{3 f^2}+\frac {b d^2 x^5}{5 f}-\frac {(b e-a f) (d e-c f)^2 \tan ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {e} f^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 170, normalized size = 1.20
method | result | size |
default | \(\frac {\frac {1}{5} b \,d^{2} x^{5} f^{2}+\frac {1}{3} a \,d^{2} f^{2} x^{3}+\frac {2}{3} b c d \,f^{2} x^{3}-\frac {1}{3} b \,d^{2} e f \,x^{3}+2 a c d \,f^{2} x -a \,d^{2} e f x +b \,c^{2} f^{2} x -2 b c d e f x +b \,d^{2} e^{2} x}{f^{3}}+\frac {\left (c^{2} a \,f^{3}-2 a c d e \,f^{2}+a \,d^{2} e^{2} f -b \,c^{2} e \,f^{2}+2 b c d \,e^{2} f -b \,d^{2} e^{3}\right ) \arctan \left (\frac {f x}{\sqrt {f e}}\right )}{f^{3} \sqrt {f e}}\) | \(170\) |
risch | \(\frac {b \,d^{2} x^{5}}{5 f}+\frac {a \,d^{2} x^{3}}{3 f}+\frac {2 b c d \,x^{3}}{3 f}-\frac {b \,d^{2} e \,x^{3}}{3 f^{2}}+\frac {2 a c d x}{f}-\frac {a \,d^{2} e x}{f^{2}}+\frac {b \,c^{2} x}{f}-\frac {2 b c d e x}{f^{2}}+\frac {b \,d^{2} e^{2} x}{f^{3}}-\frac {\ln \left (f x +\sqrt {-f e}\right ) c^{2} a}{2 \sqrt {-f e}}+\frac {\ln \left (f x +\sqrt {-f e}\right ) a c d e}{f \sqrt {-f e}}-\frac {\ln \left (f x +\sqrt {-f e}\right ) a \,d^{2} e^{2}}{2 f^{2} \sqrt {-f e}}+\frac {\ln \left (f x +\sqrt {-f e}\right ) b \,c^{2} e}{2 f \sqrt {-f e}}-\frac {\ln \left (f x +\sqrt {-f e}\right ) b c d \,e^{2}}{f^{2} \sqrt {-f e}}+\frac {\ln \left (f x +\sqrt {-f e}\right ) b \,d^{2} e^{3}}{2 f^{3} \sqrt {-f e}}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) c^{2} a}{2 \sqrt {-f e}}-\frac {\ln \left (-f x +\sqrt {-f e}\right ) a c d e}{f \sqrt {-f e}}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) a \,d^{2} e^{2}}{2 f^{2} \sqrt {-f e}}-\frac {\ln \left (-f x +\sqrt {-f e}\right ) b \,c^{2} e}{2 f \sqrt {-f e}}+\frac {\ln \left (-f x +\sqrt {-f e}\right ) b c d \,e^{2}}{f^{2} \sqrt {-f e}}-\frac {\ln \left (-f x +\sqrt {-f e}\right ) b \,d^{2} e^{3}}{2 f^{3} \sqrt {-f e}}\) | \(429\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 161, normalized size = 1.13 \begin {gather*} \frac {{\left (a c^{2} f^{3} - b d^{2} e^{3} - {\left (b c^{2} e + 2 \, a c d e\right )} f^{2} + {\left (2 \, b c d e^{2} + a d^{2} e^{2}\right )} f\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {1}{2}\right )}}{f^{\frac {7}{2}}} + \frac {3 \, b d^{2} f^{2} x^{5} - 5 \, {\left (b d^{2} f e - {\left (2 \, b c d + a d^{2}\right )} f^{2}\right )} x^{3} + 15 \, {\left (b d^{2} e^{2} + {\left (b c^{2} + 2 \, a c d\right )} f^{2} - {\left (2 \, b c d e + a d^{2} e\right )} f\right )} x}{15 \, f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.78, size = 364, normalized size = 2.56 \begin {gather*} \left [\frac {{\left (30 \, b d^{2} f x e^{3} + 15 \, {\left (a c^{2} f^{3} - b d^{2} e^{3} - {\left (b c^{2} + 2 \, a c d\right )} f^{2} e + {\left (2 \, b c d + a d^{2}\right )} f e^{2}\right )} \sqrt {-f e} \log \left (\frac {f x^{2} + 2 \, \sqrt {-f e} x - e}{f x^{2} + e}\right ) - 10 \, {\left (b d^{2} f^{2} x^{3} + 3 \, {\left (2 \, b c d + a d^{2}\right )} f^{2} x\right )} e^{2} + 2 \, {\left (3 \, b d^{2} f^{3} x^{5} + 5 \, {\left (2 \, b c d + a d^{2}\right )} f^{3} x^{3} + 15 \, {\left (b c^{2} + 2 \, a c d\right )} f^{3} x\right )} e\right )} e^{\left (-1\right )}}{30 \, f^{4}}, \frac {{\left (15 \, b d^{2} f x e^{3} + 15 \, {\left (a c^{2} f^{3} - b d^{2} e^{3} - {\left (b c^{2} + 2 \, a c d\right )} f^{2} e + {\left (2 \, b c d + a d^{2}\right )} f e^{2}\right )} \sqrt {f} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\frac {1}{2}} - 5 \, {\left (b d^{2} f^{2} x^{3} + 3 \, {\left (2 \, b c d + a d^{2}\right )} f^{2} x\right )} e^{2} + {\left (3 \, b d^{2} f^{3} x^{5} + 5 \, {\left (2 \, b c d + a d^{2}\right )} f^{3} x^{3} + 15 \, {\left (b c^{2} + 2 \, a c d\right )} f^{3} x\right )} e\right )} e^{\left (-1\right )}}{15 \, f^{4}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 347 vs.
\(2 (138) = 276\).
time = 0.58, size = 347, normalized size = 2.44 \begin {gather*} \frac {b d^{2} x^{5}}{5 f} + x^{3} \left (\frac {a d^{2}}{3 f} + \frac {2 b c d}{3 f} - \frac {b d^{2} e}{3 f^{2}}\right ) + x \left (\frac {2 a c d}{f} - \frac {a d^{2} e}{f^{2}} + \frac {b c^{2}}{f} - \frac {2 b c d e}{f^{2}} + \frac {b d^{2} e^{2}}{f^{3}}\right ) - \frac {\sqrt {- \frac {1}{e f^{7}}} \left (a f - b e\right ) \left (c f - d e\right )^{2} \log {\left (- \frac {e f^{3} \sqrt {- \frac {1}{e f^{7}}} \left (a f - b e\right ) \left (c f - d e\right )^{2}}{a c^{2} f^{3} - 2 a c d e f^{2} + a d^{2} e^{2} f - b c^{2} e f^{2} + 2 b c d e^{2} f - b d^{2} e^{3}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{e f^{7}}} \left (a f - b e\right ) \left (c f - d e\right )^{2} \log {\left (\frac {e f^{3} \sqrt {- \frac {1}{e f^{7}}} \left (a f - b e\right ) \left (c f - d e\right )^{2}}{a c^{2} f^{3} - 2 a c d e f^{2} + a d^{2} e^{2} f - b c^{2} e f^{2} + 2 b c d e^{2} f - b d^{2} e^{3}} + x \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 178, normalized size = 1.25 \begin {gather*} \frac {{\left (a c^{2} f^{3} - b c^{2} f^{2} e - 2 \, a c d f^{2} e + 2 \, b c d f e^{2} + a d^{2} f e^{2} - b d^{2} e^{3}\right )} \arctan \left (\sqrt {f} x e^{\left (-\frac {1}{2}\right )}\right ) e^{\left (-\frac {1}{2}\right )}}{f^{\frac {7}{2}}} + \frac {3 \, b d^{2} f^{4} x^{5} + 10 \, b c d f^{4} x^{3} + 5 \, a d^{2} f^{4} x^{3} - 5 \, b d^{2} f^{3} x^{3} e + 15 \, b c^{2} f^{4} x + 30 \, a c d f^{4} x - 30 \, b c d f^{3} x e - 15 \, a d^{2} f^{3} x e + 15 \, b d^{2} f^{2} x e^{2}}{15 \, f^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.86, size = 203, normalized size = 1.43 \begin {gather*} x^3\,\left (\frac {a\,d^2+2\,b\,c\,d}{3\,f}-\frac {b\,d^2\,e}{3\,f^2}\right )+x\,\left (\frac {b\,c^2+2\,a\,d\,c}{f}-\frac {e\,\left (\frac {a\,d^2+2\,b\,c\,d}{f}-\frac {b\,d^2\,e}{f^2}\right )}{f}\right )+\frac {b\,d^2\,x^5}{5\,f}+\frac {\mathrm {atan}\left (\frac {\sqrt {f}\,x\,\left (a\,f-b\,e\right )\,{\left (c\,f-d\,e\right )}^2}{\sqrt {e}\,\left (-b\,c^2\,e\,f^2+a\,c^2\,f^3+2\,b\,c\,d\,e^2\,f-2\,a\,c\,d\,e\,f^2-b\,d^2\,e^3+a\,d^2\,e^2\,f\right )}\right )\,\left (a\,f-b\,e\right )\,{\left (c\,f-d\,e\right )}^2}{\sqrt {e}\,f^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________